package com.dq.domain.config;


import com.dq.domain.base.BaseEntity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

/**
 * 系统配置信息
 *
 * @author gewenzhen
 */
@Data
@Entity
public class SysConfig extends BaseEntity {
    @NotBlank(message = "参数值不能为空")
    protected String configKey; // 配置健值
    @NotBlank(message = "参数值不能为空")
    protected String configValue; // 配置值
    protected String configNote; // 备注

    @Enumerated(EnumType.ORDINAL)
    private Status status; // 配置状态

    public enum Status {
        on("启用"), off("禁用"),;

        Status(String name) {
            this.name = name;
        }

        public String name;
    }
}
